package cn.wolfcode.wolf2w.domain;


import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Setter
@Getter
@Document("spot")
public class Spot extends BaseDomain {
    private String name;        //景点名

    private String message;   //简介信息

    private String coverUrl1;  //图片1

    private String coverUrl2;  //图片2

    private String coverUrl3;  //图片3

    private String url;  //网址

    private String traffic;  //交通信息

    private String ticket;  //门票信息

    private String openingTime; //开放时间

    private String phone; //电话

    private String visitTime;//用时参考

    private int viewNum;  //到访人数

    private String summary; //简介

    public String getJsonString(){

        Map<String, Object> map = new HashMap<>();
        map.put("id",id);
        map.put("name",name);
        map.put("message",message);
        map.put("coverUrl1",coverUrl1);
        map.put("coverUrl2",coverUrl2);
        map.put("coverUrl3",coverUrl3);
        map.put("url",url);
        map.put("traffic",traffic);
        map.put("ticket",ticket);
        map.put("openingTime",openingTime);
        map.put("phone",phone);
        map.put("visitTime",visitTime);
        map.put("viewNum",viewNum);
        map.put("id",id);
        map.put("summary",summary);
        return JSON.toJSONString(map);
    }
}

